<?php

use Illuminate\Foundation\Inspiring;

/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/

Artisan::command('sync:msg_task', function () {
    \App\Handlers\RedisHandler::syncMsgTasks();
})->describe('同步任务数据');

Artisan::command('sync:config', function () {
    \App\Handlers\RedisHandler::syncConfig();
})->describe('同步配置数据');

//Artisan::command('sync:account', function () {
//    \App\Handlers\RedisHandler:: syncAcmysql();
//})->describe('一个小时同步账号数据');
//
//Artisan::command('sync:device', function () {
//    \App\Handlers\RedisHandler::syncDemysql();
//})->describe('一个小时同步设备码数据');

Artisan::command('sync:msglog', function () {
    \App\Handlers\RedisHandler::syncMsgLog();
})->describe('1小时同步任务日志');

Artisan::command('account_queue:rebuild', function () {
    (new \App\Handlers\RedisHandler())->rebuild();
})->describe('重建账号队列');

Artisan::command('calculate:device', function () {
    \App\Handlers\RedisHandler::device();
})->describe('计算和同步设备数据');

Artisan::command('clear:machine', function () {
    \App\Handlers\RedisHandler::clearMachine();
})->describe('清除设备每天工作次数');
Artisan::command('sync:old_device', function () {
    \App\Handlers\RedisHandler::syncOld();
})->describe('5分钟清理一次没有回执的');

Artisan::command('sync:old_account', function () {
    \App\Handlers\RedisHandler::syncAcOld();
})->describe('5分钟清理一次没有回执的');
Artisan::command('delete:msgtask', function () {
    \App\Handlers\RedisHandler::taskdelete();
})->describe('xiawu');

